const router = require('koa-router')();
const blogModel = require('../model/blog');
router.post('/doEdit', async ctx=>{
    var {title,content,id} = ctx.request.body
    await blogModel.updateMany({_id:id},{title,content})
    await ctx.redirect('/detail?id='+id)
})
module.exports = router;